Prod := function(x); return &*x; end function; /* This function checks if the product of a tuple satisfies the eigenvalue condition */ P := function(X, k: A := {1}, Q := X[1]); error if Q notin X, "Q is not in X"; Y := Exclude(X, Q); G := Sym(SetToIndexedSet(Seqset(Y))); /* just to reduce permutations checked*/ if exists(g){g: g in G| exists(s){s : s in Eigenvalues(Q*Prod(Eltseq(g)))|s[1] notin A and s[2] eq k }} then; return true, [Q] cat Eltseq(g); /* sequence returned is the order to take the product in */ else return false, _; end if; end function; function Sub_Order(W, x); G := sub; return #G; end function; function Conj_Classes(W); s := 0; Q := [W.1]; repeat s := s + 1; if exists(q){q: q in W| IsReflection(q) and forall(w){w: w in Q | not IsConjugate(W, q, w)}} then; Append(~Q, q); s := 0; end if; until s eq 1; return Q; end function; function Fix_M(W: T := Rank(W) + 1, Q := [W.1]); i := 0; Total := {}; repeat i := i + 1; X := Subsets(IndexedSetToSet(&join{Class(W, q) : q in Q[i..#Q]} diff Seqset(Q[1..i])), T-1); X_1 := &join{{{Q[i]} join x} : x in X}; Total := Total join X_1; /*X_1 should be subsets containing elements from Q[i]-th conjugacy class rep in each set but not any elements from j-th conj class for j < i */ until i eq #Q; return SetToIndexedSet(Total); end function; /* Note: Below you have to manually change the interval of counting from 100 for small groups to 10000 for larger ones */ function Find_All_Tuples(W, M: A := {1}, T := Rank(W) +1, Order := false); if Order eq true then; FR := FreeGroup(T); printf "Base Ring of W: %o \n", BaseRing(W); X := {@@}; printf "Number of tuples to check is %o \n", #M; error if #M lt 20000, "Numbers of tuples to check is less than 20000"; j := 1; m := #M div 20000; t := Cputime(); while j in [1..m+1] do; M_1 := {@ M[i]: i in [(j-1)*20000 +1..Min(j*20000, #M)] | IsIrreducible(GModule(FR, Setseq(M[i]))) and P(Setseq(M[i]), T-2: A := A) and Sub_Order(W,Setseq(M[i])) eq #W @}; for m in M_1 do; u, v := P(Setseq(m), T-2: A := A); Include(~X, v); end for; printf "Found %o new tuples \n", #M_1; printf "Checked upto index %o of %o, computation time so far: %o \n", Min(j*20000, #M), #M, Cputime(t); j := j+1; end while; else; FR := FreeGroup(T); printf "Base Ring of W: %o \n", BaseRing(W); X := {@@}; printf "Number of tuples to check is %o \n", #M; error if #M lt 20000, "Numbers of tuples to check is less than 20000"; j := 1; m := #M div 20000; t := Cputime(); while j in [1..m+1] do; M_1 := {@ M[i]: i in [(j-1)*20000 +1..Min(j*20000, #M)] | IsIrreducible(GModule(FR, Setseq(M[i]))) and P(Setseq(M[i]), T-2: A := A) @}; for m in M_1 do; u, v := P(Setseq(m), T-2: A := A); Include(~X, v); end for; printf "Found %o new tuples \n", #M_1; printf "Checked upto index %o of %o, computation time so far: %o \n", Min(j*20000, #M), #M, Cputime(t); j := j+1; end while; end if; return X; end function;